972402ad3aa2869cbb3906e37db43308c707fbbb,wsmaster/codenvy-hosted-api-audit/src/test/java/com/codenvy/api/audit/server/AuditManagerTest.java,AuditManagerTest,setUp,#,137
Before Change
.thenReturn(new GregorianCalendar(2016, MARCH, 4, 22, 15).getTimeInMillis());
when(systemLicenseActionHandler.findAction(PRODUCT_LICENSE, ADDED)).thenReturn(addProductLicenseAction);
SystemLicenseAction expireProductLicenseAction = mock(SystemLicenseAction.class);
when(expireProductLicenseAction.getLicenseId()).thenReturn("1234");
when(expireProductLicenseAction.getActionTimestamp())
.thenReturn(new GregorianCalendar(2016, MARCH, 5, 22, 15).getTimeInMillis());
when(systemLicenseActionHandler.findAction(PRODUCT_LICENSE, EXPIRED)).thenReturn(expireProductLicenseAction);
//User
UserImpl user1 = mock(UserImpl.class);
UserImpl user2 = mock(UserImpl.class);
After Change
when(userManager.getTotalCount()).thenReturn(2L);
when(ADD_PRODUCT_LICENSE_ACTION.getLicenseType()).thenReturn(PRODUCT_LICENSE);
when(ADD_PRODUCT_LICENSE_ACTION.getActionType()).thenReturn(ADDED);
when(systemLicenseActionHandler.findAction(PRODUCT_LICENSE, ADDED)).thenReturn(ADD_PRODUCT_LICENSE_ACTION);
when(EXPIRE_PRODUCT_LICENSE_ACTION.getLicenseType()).thenReturn(PRODUCT_LICENSE);
when(EXPIRE_PRODUCT_LICENSE_ACTION.getActionType()).thenReturn(EXPIRED);
when(systemLicenseActionHandler.findAction(PRODUCT_LICENSE, EXPIRED)).thenReturn(EXPIRE_PRODUCT_LICENSE_ACTION);
when(REMOVE_PRODUCT_LICENSE_ACTION.getLicenseType()).thenReturn(PRODUCT_LICENSE);
when(REMOVE_PRODUCT_LICENSE_ACTION.getActionType()).thenReturn(REMOVED);